﻿using System;
using System.Collections.Generic;
using System.Text;
using DotNet.Data;
using DotNet.Model;

namespace DotNet.Business
{
    class orederInfoBll
    {
        orederInfoDal oiDal = new orederInfoDal();
        #region 是否存在该记录
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int oInfoId)
        {
            return oiDal.Exists(oInfoId);
        }
        #endregion

        #region 获得订单详细列表
        /// <summary>
        /// 获得订单详细列表
        /// </summary>
        /// <returns></returns>
        public IList<orederInfo> GetModel()
        {
            return oiDal.GetModel();
        }
        #endregion

        #region 根据订单详细号查询实体
        /// <summary>
        /// 根据订单详细号查询实体
        /// </summary>
        /// <param name="oInfoId"></param>
        /// <returns></returns>
        public orederInfo GetModel(int oInfoId)
        {
            return oiDal.GetModel(oInfoId);
        }
        #endregion

        #region 修改订单详细信息
        /// <summary>
        /// 修改订单详细信息
        /// </summary>
        /// <param name="orederInfo"></param>
        /// <returns></returns>
        public bool Update(orederInfo orederinfo)
        {
            return oiDal.Update(orederinfo);
        }
        #endregion

        #region 删除订单详细根据订单详细号
        /// <summary>
        /// 删除订单详细根据订单详细号
        /// </summary>
        /// <param name="oInfoId"></param>
        /// <returns></returns>
        public bool Delete(int oInfoId)
        {
            return oiDal.Delete(oInfoId);
        }
        #endregion

        #region 添加订单详细
        /// <summary>
        /// 添加订单详细
        /// </summary>
        /// <param name="orederInfo"></param>
        /// <returns></returns>
        public bool Insert(orederInfo orederinfo)
        {
            return oiDal.Insert(orederinfo);
        }
        #endregion
    }
}
